package com.dtwave.wechat.service.provider.core.job;

import com.dtwave.wechat.service.provider.service.IWeChatInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.ArrayList;

/**
 * @Auther: liuwenxiang
 * @Date: 2019/2/23 18:35
 * @Description:
 */

@Component
public class WeChatTask extends  BaseTask{


    @Autowired
    IWeChatInterfaceService weChatInterfaceService;

    @Scheduled(cron = "${quartz.txl}")
    public void synchTxl() {
        try {
            logger.info("开始同步企业微信通讯录。。。。。。。。");
            //同步微信企业号通讯录
            weChatInterfaceService.synchTxl();
            logger.info("结束同步企业微信通讯录。。。。。。。。");
        } catch (Exception e) {
            logger.info("--------------------企业微信通讯录同步异常--------------------\n\n", e);
        }
    }


}
